<?php $view->extend('Site1Bundle::layout') ?>
<h2>Дерево:</h2>
<form action="<?php echo $view->router->generate('tree_view', array('id' => $tree->getId())) ?>" method="post">
    <table>
        <tr>
            <td> ID </td>
            <td> <?php echo $tree->getId(); ?> </td>
        </tr>
        <tr>
            <td> Приоритет </td>
            <td> <input type="text" name="order" value="<?php echo $tree->getOrder(); ?>" /></td>
        </tr>
        <tr>
            <td> ... </td>
            <td> ... </td>
        </tr>

        <tr>
            <td> Описание </td>
            <td>
                <?php if($tree->getDescription() == null) : ?>
                Описания нет. <a href="<?php echo $view->router->generate('desc_edit', array('id' => $tree->getId())) ?>">Создать</a>
                <?php endif; ?>

                <?php if($tree->getDescription() != null) : ?>
                "<?php echo $tree->getDescription()->getValue(); ?>"
                <a href="<?php echo $view->router->generate('desc_edit', array('id' => $tree->getId())) ?>">Изменить</a>
                <?php endif; ?>
            </td>
        </tr>

        <tr>
            <td> Безопасность </td>
            <td>
                <?php if($tree->getSecurity() == null) : ?>
                Правил нет. <a href="<?php echo $view->router->generate('sec_edit', array('id' => $tree->getId())) ?>">Создать</a>
                <?php endif; ?>

                <?php if($tree->getSecurity() != null) : ?>
                "<?php echo $tree->getSecurity()->getValue(); ?>"
                <a href="<?php echo $view->router->generate('sec_edit', array('id' => $tree->getId())) ?>">Изменить</a>
                <?php endif; ?>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" title="Обновить" /></td>
        </tr>
    </table>
</form>